import axios from '@/utils/axios'


//根据id查询房间信息
export const queryRoomByIdAPI = (id) => {
    return axios.post(`/api/dor/dor-client/cms/dormRoom//get?id=${id}`, {
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

// 分页查询房间信息，支持传递参数
export const queryRoomAPI = (params = {}) => {
    return axios.post('/api/dor/dor-client/cms/dormRoom/queryPageList', params, {
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

//编辑房间信息
export const updateRoomAPI = (data) => {
    return axios.post('/api/dor/dor-client/cms/dormRoom/update', data, {
      headers: {
        'Content-Type': 'application/json'
      }
    })
}

//删除房间信息
export const deleteRoomAPI = (id) => {
    return axios.post(`/api/dor/dor-client/cms/dormRoom/delete?id=${id}`, {
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

//新增房间信息
export const addRoomAPI = (data) => {
    return axios.post('/api/dor/dor-client/cms/dormRoom/insert', data, {
        headers: {
            'Content-Type': 'application/json'
        }
    })
}